package com.community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * (License)表实体类
 *
 * @author makejava
 * @since 2021-10-14 14:21:18
 */
@SuppressWarnings("serial")
public class License extends Model<License> {

    @TableId(value = "id", type = IdType.INPUT) //这种方式是主键手动输入
    private Integer id;
    //车牌号
    private String licensePlate;
    //创建时间
    private Date modifyDate;
    //1:外来 2:内部
    private Integer interior;
    //1:在 2:离开
    private Integer statuc;

    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date overDate;

    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getOverDate() {
        return overDate;
    }

    public void setOverDate(Date overDate) {
        this.overDate = overDate;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getLicensePlate() {
        return licensePlate;
    }

    public void setLicensePlate(String licensePlate) {
        this.licensePlate = licensePlate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public Integer getInterior() {
        return interior;
    }

    public void setInterior(Integer interior) {
        this.interior = interior;
    }

    public Integer getStatuc() {
        return statuc;
    }

    public void setStatuc(Integer statuc) {
        this.statuc = statuc;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "License{" +
                "id=" + id +
                ", licensePlate='" + licensePlate + '\'' +
                ", modifyDate=" + modifyDate +
                ", interior=" + interior +
                ", statuc=" + statuc +
                ", beginDate=" + beginDate +
                ", overDate=" + overDate +
                '}';
    }
}

